<?php
class Userrole extends Zend_Db_Table {
	protected $_name = 'cc_userrole';
	/**
	 * DB
	 */
	private $db;
	
	/**
	 * 
	 * @access public
	 * @return 
	 */
	public function __construct(){
		$this->db = Zend_Db_Table::getDefaultAdapter();
		
		parent::_setup();
	}
	
	/**
	 * 取回用户角色
	 * @access public
	 * @return string userRoleId
	 */
	public function getUserRoleByUserId($userid){
		$where = $this->db->quoteInto('userid=?',$userid);
		$userRole = $this->fetchRow($where);
		return $userRole->toArray();
	}
}
?>